class Solution(object):
    def maxAscendingSum(self, nums):
        now = nums[0]
        max_now = nums[0]
        for i in range(1, len(nums)):
            if nums[i] > nums[i - 1]:
                now += nums[i]
                max_now = max(max_now, now)
            else:
                now = nums[i]
                max_now = max(max_now, now)
        return max_now